package com.share.tool.m2d.kundb.tablestructure;

import java.util.HashSet;
import java.util.Set;

public enum Db {
//    rulengine("[rulengine]", "D:\\工作记录\\数据库\\表结构\\220810-rulengine.sql"),
//    channel("[channel]", "D:\\工作记录\\数据库\\表结构\\220810-channel.sql"),
//    varplatform("[varplatform]", "D:\\工作记录\\数据库\\表结构\\220810-varplatform.sql"),
    risk("[risk]", "E:\\share\\syq\\qianyi\\risk_jiegou.sql"),
    risk_third_credit("[risk_third_credit]", "E:\\share\\syq\\qianyi\\risk_third_credit_jiegou.sql");

    private String dbName;
    private String filepath;

    Db(String dbName, String filepath) {
        this.dbName = dbName;
        this.filepath = filepath;
    }

    public String getFilepath() {
        return filepath;
    }

    public String getDbName() {
        return dbName;
    }

    public static Set<String> listDbName() {
        Set<String> set = new HashSet<>();
        Db[] values = Db.values();
        for (Db item : values) {
            set.add(item.getDbName());
        }
        return set;
    }
}
